import React from 'react';
import './index.css';
import {Route,Switch,Redirect} from 'react-router-dom';
import Sider from '../../components/Sider/index';
import UserInfo from './UserInfo';
import Album from './Album';
import AlbumList from './AlbumList'

const Index =(props)=>{

    

    return(
        <div className="index_container">
        <div className="index_container_center">
            <div className="index_sidercontainer">
            <Sider/>
            </div>
            <div className="index_contentcontainer">
                <Switch>
                    <Route path="/index/album" component={Album}/>
                    <Route path="/index/userinfo" component={UserInfo}/>
                    <Route path='/index/albumlist/:albumid' component={AlbumList}/> 
                    <Redirect to="/index/album"/>
                </Switch>
            </div>
        </div>
        </div>
    )
}

export default Index;